package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 楼栋数据传输对象
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@Schema(description = "楼栋信息DTO")
public class BuildingDTO {

    @Schema(description = "楼栋ID")
    private Long id;

    @Schema(description = "楼栋编号")
    @Size(max = 50, message = "楼栋编号长度不能超过50个字符")
    private String buildingNo;

    @Schema(description = "楼栋名称", required = true)
    @NotBlank(message = "楼栋名称不能为空")
    @Size(max = 100, message = "楼栋名称长度不能超过100个字符")
    private String buildingName;

    @Schema(description = "所属社区ID", required = true)
    @NotNull(message = "所属社区ID不能为空")
    private Long communityId;



    @Schema(description = "楼栋类型：存储中文建筑类型名称，如住宅楼、商业楼、办公楼、综合楼")
    private String buildingType;

    @Schema(description = "结构类型：1-框架，2-剪力墙，3-砖混，4-钢结构")
    private Integer structureType;

    @Schema(description = "楼层数", required = true)
    @NotNull(message = "楼层数不能为空")
    private Integer floorCount;

    @Schema(description = "地下层数")
    private Integer undergroundFloor;

    @Schema(description = "单元数", required = true)
    @NotNull(message = "单元数不能为空")
    private Integer unitCount;

    @Schema(description = "房户数量")
    private Integer householdCount;

    @Schema(description = "每层户数")
    private Integer unitsPerFloor = 2;

    @Schema(description = "是否有电梯：0-无，1-有")
    private Integer hasElevator;

    @Schema(description = "电梯数量")
    private Integer elevatorCount;

    @Schema(description = "建筑年代")
    private Integer buildYear;

    @Schema(description = "竣工日期")
    private LocalDate completionDate;

    @Schema(description = "建筑面积（平方米）")
    private BigDecimal area;

    @Schema(description = "占地面积（平方米）")
    private BigDecimal landArea;

    @Schema(description = "建筑高度（米）")
    private BigDecimal buildingHeight;

    @Schema(description = "详细地址")
    @Size(max = 200, message = "详细地址长度不能超过200个字符")
    private String address;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "楼栋管理员ID")
    private Long managerId;

    @Schema(description = "维护公司")
    private String maintenanceCompany;

    @Schema(description = "配套设施（JSON格式）")
    private String facilities;

    @Schema(description = "楼栋图片（JSON数组）")
    private String images;

    @Schema(description = "楼栋描述")
    @Size(max = 500, message = "楼栋描述长度不能超过500个字符")
    private String description;

    @Schema(description = "停车位数量")
    private Integer parkingSpaces;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序字段")
    private Integer sortOrder;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;
} 